package com.wjq.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;

public class EssayQuestion extends Question {

    @Id
    private Integer id;

    public static final String TEXTAREA = "textarea";

    private String description;

    private Integer questionnaireId;

    private String type = TEXTAREA;

    private Integer isMandatory = 0;

    public EssayQuestion(){
        super();
    }

    public EssayQuestion(Integer serial_num,Integer id){
        super(serial_num);
        this.id = id;
    }


    public EssayQuestion(Integer serial_num, Integer id, String description, Integer questionnaire_id) {
        super(serial_num);
        this.id = id;
        this.description = description;
        this.questionnaireId = questionnaire_id;
        this.type = TEXTAREA;
        this.isMandatory = 0;
    }

    public Integer getIsMandatory() {
        return isMandatory;
    }

    public void setIsMandatory(Integer isMandatory) {
        this.isMandatory = isMandatory;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getQuestionnaireId() {
        return questionnaireId;
    }

    public void setQuestionnaireId(Integer questionnaireId) {
        this.questionnaireId = questionnaireId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "EssayQuestion{" +
                "id=" + id +
                ", description='" + description + '\'' +
                ", questionnaireId=" + questionnaireId +
                ", type='" + type + '\'' +
                ", serialNum=" + serialNum +
                '}';
    }
}
